package day03;

/**
 * Created by Administrator on 2023/7/1 0001.
 */
public class MathTools {
    private MathTools() {
    }

    public static int gcd(int a, int b) {
        while (b != 0) {
            int r = a % b;
            a = b;
            b = r;

        }
        return a;
    }
    public static long gcd(long a, long b) {
        while (b != 0) {
            long r = a % b;
            a = b;
            b = r;
        }
        return a;
    }
    public static void main(String[] args) {
        System.out.println(gcd(6,8));
    }

}
